package com.yztc.orangeentertainment.ui.main.subscribefragment.staritem.starnewsfragment;

import android.content.Context;

import com.yztc.orangeentertainment.bean.channalbean.ListBean;
import com.yztc.orangeentertainment.config.SubscribeUrlConfig;

import java.util.List;
import java.util.Map;

/**
 * Created by My on 2016/10/8.
 */
public class NewsPresenter implements NewsContract.Presenter {
    private NewsContract.View view;
    private NewsModle modle;

    public NewsPresenter(NewsContract.View view) {
        this.view = view;
        modle=new NewsModle();
    }

    @Override
    public void getStarFromNet(Map<String, String> params, final Context context) {
        modle.getStarAll(SubscribeUrlConfig.PATH.URL_NEWS_TYPE, params, new OnLoadNewsListener() {
            @Override
            public void onSuccess(List<ListBean> listBeen) {
                view.onLoadStarSuccess(listBeen);
            }

            @Override
            public void onFailure(Exception e) {
            }
        },context);
    }
}
